package com.xf.lastmall.moudle.enums;

public enum SignEquityTypeEnum {
    //标记内容类型| 枚举 1-开发票 2-停换车票 3-抽奖 4-活动报名 5-其他（支持输入自定义标记内容）
    DRAW_BILL(1, "开发票"),

    STOP_CHANGE_TICKETS(2, "停换车票"),

    LOTTERY(3, "抽奖"),

    ACTIVITY_REGISTRATION(4, "活动报名"),

    OTHER(5, "其他");

    private Integer value;
    private String text;

    SignEquityTypeEnum(Integer value, String text) {
        this.value = value;
        this.text = text;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public static SignEquityTypeEnum fromValue(Integer value) {
        if (value == null) {
            return null;
        }
        for (SignEquityTypeEnum type : SignEquityTypeEnum.values()) {
            if (type.getValue().intValue() == value.intValue()) {
                return type;
            }
        }
        return null;
    }

    public static String getText(Integer value) {
        for (SignEquityTypeEnum type : SignEquityTypeEnum.values()) {
            if (type.getValue().equals(value)) {
                return type.getText();
            }
        }
        return "";
    }
}
